package com.guide.framework.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;


public class DynamicDataSource extends AbstractRoutingDataSource {

	private String databaseProductName = "MySQL";
	
	public String getDatabaseProductName() {
		return databaseProductName;
	}

	public void setDatabaseProductName(String databaseProductName) {
		this.databaseProductName = databaseProductName;
	}

	@Override
	protected Object determineCurrentLookupKey() {
		return DynamicDataSourceHolder.getThreadDataSource();
	}

}
